/**
 ****************************************************************************************************
 * @file        buzzer.c
 * @author      LXP
 * @version     V1.0
 * @date        2024-08-06
 * @brief       蜂鸣器驱动代码
 *
 ****************************************************************************************************
 */

#ifndef BUZZER_BUZZER_H_
#define BUZZER_BUZZER_H_

#include "stm32f4xx_hal.h"
#include "main.h"


//打开或关闭鸣响器宏定义
#define BUZZER_ON		HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_SET)
#define BUZZER_OFF		HAL_GPIO_WritePin(BUZZER_GPIO_Port, BUZZER_Pin, GPIO_PIN_RESET)
//依指定时间鸣响,最大值65535
void BUZ_openTime(uint16_t ms);

#endif /* BUZZER_BUZZER_H_ */
